addspriteaction
Adds a sprite action to the given sprite group in the Compose user interface. addspriteaction is only available in the Compose GUI.
Syntax
addspriteaction(sagname, label, name, callback, icon, tooltip, mask, enabled)
Inputs
- sagname
- The name of the sprite action group.
- label
- The label of the sprite action; must be unique.
- name
- The name of the sprite action.
- callback
- The name of the callback function, which gets called when the action is clicked.
- icon
- The PNG strip image of the sprite action.
- tooltip
- The action item's tooltip.
- mask
- pic mask from the icon strip.
- enabled
- Boolean flag to enable or disable action at the time of creation.
Outputs
- uiSpriteAction
- The handle to the sprite action.
Examples
addribbonpagegroup('Test','Indentation');
addspriteactiongroup('Test', 'Indentation', 'TestSG', 'UnIndent',0,80);
movesprite('TestSG', 0, -5);
addspriteaction('TestSG', 'TestActionLabel','TestAction', 'HandleUnIndent', 'UnIndent-80.png','','',true);
function HandleUnIndent()
disp('Unindent is handled');
end